package com.lap.auth.domain.api;

import com.lap.auth.domain.api.valueobject.*;
import com.lap.framework.entity.AbstractAudit;
import lombok.Getter;

/**
 * API 资源领域模型
 *
 * @author Shuisheng Lao(劳水生)
 * @version 0.0.1
 */
@Getter
public class Api extends AbstractAudit {

  private final Integer id;
  private final String module;
  private final String parentCode;
  private final String code;
  private final String name;
  private final HttpMethod method;
  private final String uri;
  private final ApiType apiType;
  private final ViewType viewType;
  private final AccessLevel accessLevel;
  private final UpdatedFlag updatedFlag;

  public Api(
      Integer id,
      String module,
      String parentCode,
      String code,
      String name,
      HttpMethod method,
      String uri,
      ApiType apiType,
      AccessLevel accessLevel,
      ViewType viewType,
      UpdatedFlag updatedFlag) {
    this.id = id;
    this.module = module;
    this.parentCode = parentCode;
    this.code = code;
    this.name = name;
    this.method = method;
    this.uri = uri;
    this.apiType = apiType;
    this.accessLevel = accessLevel;
    this.viewType = viewType;
    this.updatedFlag = updatedFlag;
  }
}
